<template>
  {{suiteid}}
  <br/>
  {{auth_code}}
</template>
<script setup lang="ts">
import { ElMessage, ElLoading } from 'element-plus'
import {useRoute} from "vue-router";
import {corpRegister} from "@/api/app";
import router from "@/router";
const route = useRoute()
const suiteid = route.params.suiteid
const auth_code = route.query.auth_code;
let wxstate = route.query.state;
wxstate = JSON.parse(wxstate);
console.log(wxstate);
const param = {
  "suite_id":suiteid,
  "auth_code":auth_code,
};
corpRegister(param).then((data: any)=>{
  ElMessage.success('安装成功')
  router.push(wxstate.from)
}).catch((e: any)=>{
  // ElMessage.error('安装失败：'+e)
})
</script>